From 2c3e9e2eeaa01c4cece290c18fb8d9a18cda36b3 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sun, 30 Oct 2005 23:28:32 +0100 Subject: [PATCH] Simplify trace header some more, and ensure that construction of arguments for tracing is outlined from straightline code paths. Signed-off-by: Keir Fraser --- xen/common/trace.c | 2 +- xen/include/xen/trace.h | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/xen/common/trace.c b/xen/common/trace.c index 512ab4a59a..becdaff853 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -40,7 +40,7 @@ static struct t_buf *t_bufs[NR_CPUS]; /* a flag recording whether initialization has been done */ /* or more properly, if the tbuf subsystem is enabled right now */ -int tb_init_done = 0; +int tb_init_done; /* which CPUs tracing is enabled on */ static unsigned long tb_cpu_mask = (~0UL); diff --git a/xen/include/xen/trace.h b/xen/include/xen/trace.h index 8e5e282769..e09051c259 100644 --- a/xen/include/xen/trace.h +++ b/xen/include/xen/trace.h @@ -23,12 +23,8 @@ #ifndef __XEN_TRACE_H__ #define __XEN_TRACE_H__ -#include -#include -#include +#include #include -#include -#include #include #include @@ -46,7 +42,7 @@ void trace(u32 event, unsigned long d1, unsigned long d2, /* Avoids troubling the caller with casting their arguments to a trace macro */ #define trace_do_casts(e,d1,d2,d3,d4,d5) \ do { \ - if ( tb_init_done ) \ + if ( unlikely(tb_init_done) ) \ trace(e, \ (unsigned long)d1, \ (unsigned long)d2, \ -- 2.30.2